package com.meng.system.domain;

import java.util.concurrent.ScheduledFuture;

/**
 * @author Mr.Still
 * @version 1.0.0
 * @date 2021-06-12 23:55
 **/
public final class ScheduledTask {

    public volatile ScheduledFuture<?> future;

    /**
     * 取消定时任务
     */
    public void cancel() {
        ScheduledFuture<?> future = this.future;
        if (future != null) {
            future.cancel(true);
        }
    }

}
